package com.example.mybatislearn.domain.type;

import com.example.mybatislearn.common.lang.Enumerable;

public enum UserType implements Enumerable {

    NORMAL_USER(1, "个人用户"),

    ENTERPRISE_USER(2, "企业用户");

    private final Integer code;
    private final String description;

    UserType(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getCodeString() {
        return name();
    }

    @Override
    public String getDescription() {
        return description;
    }
}
